<!--例行工作-->
<template>
  <div>
    <el-table
        ref="multipleTable"
        :data="fileList"
        border
        :height="property.tableHeight"
        tooltip-effect="dark"
        style="width: 100%"
        header-cell-class-name="table-text-c"
        cell-class-name="table-text-c">
      <el-table-column
          prop="id"
          label="ID"
          align="center"
          width="90">
      </el-table-column>
      <el-table-column
          prop="create_time"
          label="创建时间"
          align="center">
      </el-table-column>
      <el-table-column
          label="提交人"
          align="center">
        <template slot-scope="scope">
          {{ scope.row.user ? scope.row.user.realname : '未提交' }}
        </template>
      </el-table-column>
      <el-table-column
          label="文件"
          align="center">
        <template slot-scope="scope">
          <div v-for="item in scope.row.file">
            <btn_file :option="item"></btn_file>
          </div>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import {noteList} from '@/api/admin/outineWorke'

export default {
  props:['property','pageindex'],
  name: "style0",
  data() {
    return {
      currentview: null, // propertytype: "companyProperty",
      dialogVisible: false,
      editStatus: true,
      fileList: [],
      editForm: {
        name: '',
        p: 1,
      },
    }
  },
  watch: {
    'pageindex'(){
      this.getFileListFn()
    }
  },
  created() {
    console.log('页面数据', this.property)
    this.getFileListFn()
  },
  methods: {
    // 获取记录
    getFileListFn() {
      noteList({p: this.pageindex, cate_id: this.property.id, user_id: this.property.user_id}).then(res => {
        for (let item of res.list.data) {
          item.file = JSON.parse(item.file)
        }
        this.fileList = res.list.data
        this.$emit('pagtotal', res.list.total)
      })
    },
    // 关闭弹窗
    closePOpup() {
      this.$emit('update:visible', false)
    },
    getJson(option) {
      return JSON.parse(JSON.stringify(option))
    }
  },
  mounted() {
  }
}
</script>

<style scoped>

</style>
